package com.gaofeng.day11;

/**
 * @author gaofeng
 * @date 2024-12-22 - 12:55
 */
public class demo05 {
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5};
        int temp = arr[0];
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]);
        }
        System.out.println("");

        for (int i = 0,j = arr.length-1; i < j; i++,j--) {
            temp = arr[i];
            arr[i] = arr[j];
            arr[j] = temp;
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]);
        }
    }
}
